﻿<Window x:Class="TextEditorExample.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:t="clr-namespace:Leow.TextEditor;assembly=Leow.TextEditor"
        Title="MainWindow" Height="350" Width="525" WindowStartupLocation="CenterScreen">
    <Grid>
        <t:TextEditor x:Name="TextEditor1" Margin="10"
                      FontFamily="Arial,Consolas,Courier New"
                      HorizontalLinesBrush="LightBlue"
                      LineNumberMarginPadding="10" Text="Hello World"
                      SelectionMode="Line">
            <t:TextEditor.SelectionBrush>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                    <GradientStop Color="LightYellow" Offset="0"></GradientStop>
                    <GradientStop Color="Gold" Offset="0.4"></GradientStop>
                    <GradientStop Color="Gold" Offset="0.6"></GradientStop>
                    <GradientStop Color="LightYellow" Offset="1"></GradientStop>
                </LinearGradientBrush>
            </t:TextEditor.SelectionBrush>
            <t:TextEditor.ContextMenu>
                <ContextMenu>
                    <MenuItem Command="Cut"/>
                    <MenuItem Command="Copy"/>
                    <MenuItem Command="Paste"/>
                </ContextMenu>
            </t:TextEditor.ContextMenu>
        </t:TextEditor>
    </Grid>
</Window>
